package com.kang.controller;

import com.kang.bean.bot.MapType;
import com.kang.commons.Result;
import com.kang.service.warMap.MapTypeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: service
 * @description:
 * @author: K.faWu
 * @create: 2022-05-09 14:01
 **/
@Slf4j
@RestController
@RequestMapping("mapType")
public class MapTypeController {
    private final MapTypeService mapTypeService;

    public MapTypeController(MapTypeService mapTypeService) {
        this.mapTypeService = mapTypeService;
    }

    @GetMapping
    public Result<?> getAll(){
        List<MapType> list = mapTypeService.getAll();
        return Result.success(list);
    }
}
